﻿<Page
    x:Class="Microsoft.ALMRangers.VsarTreasureMap.WindowsStoreApp.Views.Snapped.News"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Microsoft.ALMRangers.VsarTreasureMap.WindowsStoreApp.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="768"
    d:DesignWidth="350">

    <Grid Background="{StaticResource BackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="80"/>
            <RowDefinition Height="20"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition  Width="*"/>
            </Grid.ColumnDefinitions>
            <Button Command="{Binding GoBack}" Grid.Column="0" Style="{StaticResource BackButtonStyle}" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="0" />
            <TextBlock Grid.Column="1" Style="{StaticResource SnappedPageHeaderTextStyle}" Text="News" Margin="0,0,0,20" FontFamily="{StaticResource TitleFont}" Foreground="{StaticResource TitleBrush}" />
        </Grid>
        <ListView Margin="60,0,0,0" Grid.Row="2" ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" Tapped="ListViewTapped" ItemContainerStyle="{StaticResource ListViewItemStyle}">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <Grid Height="141" Width="250">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="5" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="5" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Row="0" Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" Foreground="{StaticResource TitleBrush}" FontSize="16"/>
                        <TextBlock Grid.Row="2" Style="{StaticResource SubtitleTextStyle}" Text="{Binding Age}" Foreground="{StaticResource ComboBoxItemPressedBackgroundThemeBrush}" />
                        <TextBlock Grid.Row="4" Text="{Binding Content}" TextTrimming="WordEllipsis" TextWrapping="Wrap" Style="{StaticResource ItemTextStyle}"/>
                    </Grid>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </Grid>
</Page>